#pragma once

#include <string>

namespace boost{class mutex;}

using std::string;

class CxGlobal
{
public:
    CxGlobal();
    ~CxGlobal();

public:
    std::string                 getIpaddr(int )const;
    short                       getPortnumber(int   )const;
    std::string                 getMobileaddr()const;
    std::string                 getVideofilepath()const;
    std::string                 getlogFilepath()const;
    std::string                 getsetFilepath()const;
    std::string                 getdbAddr()const;
    std::string                 getdbType()const;

    void                        setIpAddr(int ,std::string);
    void                        setPortnumber(int ,short);
    void                        setMobileaddr(std::string);
    void                        setVideofilepath(std::string);
    void                        setlogFilepath(std::string);
    void                        setsetFilepath(std::string);

    void                        setdbAddr(std::string);
    void                        setdbType(std::string);



    void                        writeSetfile(int ,int ,int );


private:

    static  short               s_portNumber[4];
    static  unsigned int        s_refnumber;
    static  std::string         s_ipAddr[4];
    static  std::string         s_videoFilepaht;
    static  std::string         s_logFilepath;
    static  std::string         s_setFilepath;
    static  std::string         s_mobileAddr;
    static  std::string         s_databaseAddr;
    static  std::string         s_databaseType;

    static  boost::mutex        s_mu;
};
